<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8"%>
<!doctype html>

<html class="no-js">

<head>
<%@ include file="../commoms/link.txt"%>
<script type="text/javascript" src="assets/js/pagejs/ReqDiffStatus.js"></script>
<meta name="description" content="JobUnderReview">
</head>

<body>
	<%@ include file="../commoms/EEHeader.txt"%>
	<!-- sidebar end -->

	<!-- content start -->
	<div class="admin-content">
 <div class="admin-content-body">
		<div class="am-g">
			<div class="am-u-sm-12">
				<table
					class="am-table am-table-bd am-table-striped admin-content-table am-table-radius am-table-bordered reqtable">
					<thead>
						<tr>
							<th class="table-id">ID</th>
							<th  class="table-title">工作名</th>
							<th class="table-author am-hide-sm-only">工作待遇</th>
							<th class="table-author am-hide-sm-only">联系电话</th>
							<th class="table-date am-hide-sm-only">工作时间</th>
							<th class="table-date am-hide-sm-only">报名时间</th>
							<th class="table-set">管理</th>
						</tr>
					</thead>
					<tbody id="pagecontainer">

					</tbody>
				</table>
				
			</div>
		
		</div>
	
	          <div class="am-fr">
			<ul id="page" data-am-widget="pagination"
				class="am-pagination am-pagination-default">
			  </ul>
              </div>
	</div>
</div>
</div>

	<%@ include file="../commoms/alert.txt"%>
	<a href="#"
		class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
		data-am-offcanvas="{target: '#admin-offcanvas'}"></a>


	<%
		String status = request.getParameter("status");
		if (status != null) {
			if (!status.equals("")) {
	%>
	<script type="text/javascript">
					var currentpage = 1;
					var pages = 1;
					var $ul = $('#page');
					var ldata=null;
					var nums=0;
					var $pagecontainer = $('#pagecontainer');
						$pagecontainer.on('click','.ptjob',function(event){
						var pid=event.currentTarget.id;
						 var index=pid.replace('ptjob',"");
						if(event.target.nodeName!='BUTTON'&&event.target.nodeName!='SPAN')
							{
						myPost('showItemDetail.do',{'ptid':ldata[index].ptid}); 
							}
					});
				$pagecontainer.on('click','.show',function(event){further('show',event.currentTarget.id)});
					$pagecontainer.on('click','.cancelreq',function(event){ further('cancelreq',event.currentTarget.id) });
					$pagecontainer.on('click','.del',function(event){further('del',event.currentTarget.id) });
					nums=getEEAllCount(<%=status%>);
					pages = nums;
					pages = Math.ceil(pages / 5)
					if (nums != 0) {
						drawPages($ul, currentpage, pages, 10);
						getdiffreqcontent(domain + '/getDiffReqJob.do', {
							'page' : currentpage,
							'status' :<%=status%>}, $pagecontainer);}
				

		function changepage(a) {
			if (a.innerHTML === '第一页')
				currentpage = 1;
			else if (a.innerHTML === '最末页')
				currentpage = pages;
			else if (a.innerHTML === '上一页')
				currentpage -= 1;
			else if (a.innerHTML === '下一页')
				currentpage += 1;
			else
				currentpage = a.innerHTML;
			$ul.empty();
			drawPages($ul, currentpage, pages, 10);
			$pagecontainer.empty();
			getdiffreqcontent(domain + '/getDiffReqJob.do', {
				'page' : currentpage,
				'status' :<%=status%>}, $pagecontainer);
			return false;
		}
	</script>
	<%
		}
		}
	%>

</body>
</html>
